package cn.edu.scau.cmi.maikejian.simpleFactoryMethod;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;

public class Controller {
    Creator cre = new Creator();
    @FXML
    private Button chicken;

    @FXML
    private TextArea textarea;

    @FXML
    private Button beef;

    @FXML
    private Button pork;

    @FXML
    void creatPork(ActionEvent event) {
    	textarea.appendText(cre.factory("Pork").product());
    }

    @FXML
    void creatBeef(ActionEvent event) {
    	textarea.appendText(cre.factory("Beef").product());
    }

    @FXML
    void creatChicken(ActionEvent event) {
    	textarea.appendText(cre.factory("Chicken").product());
    }

}
